package com.tbit.mvc.convert;

import org.springframework.core.convert.converter.Converter;
import org.springframework.util.StringUtils;

/**
 * created by Kang on 2018/12/25 18:33
 * description:字符串控制去除
 */
public class StringRemoveBlankConvert implements Converter<String, String> {
    @Override
    public String convert(String source) {
        if (!StringUtils.isEmpty(source)) {
            return source.trim();
        }
        return null;
    }
}
